# -*- coding:utf-8 -*-
# @Time : 2021/8/15 22:52
# @Author: tangn
# @File : Order.py
from datetime import datetime
from decimal import Decimal
from typing import Optional

from pydantic import BaseModel

from enums.PayTypeEnum import PayTypeEnum


class Order(BaseModel):
    id: Optional[int] = None
    # 字符串
    order_no: Optional[str]
    # 用户ID
    user_id: Optional[int]
    # 订单金额 Decimal 高精度
    order_amount: Optional[Decimal] = None
    # 枚举类型引用
    pay_type: Optional[PayTypeEnum] = None
    # 订单时间
    order_time: Optional[datetime] = None
